package com.hzhc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzhc.entity.TbSequence;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 全局seq表  Mapper 接口
 * </p>
 *
 * @author YJT
 * @since 2023-10-31
 */
public interface TbSequenceMapper extends BaseMapper<TbSequence> {


    @Select("select hcseq_nextval_month(#{tabName}) as seqid from dual")
    int hcSeqNextMonthSuffix(@Param("tabName") String tabName);

    @Select("select hcseq_nextval_year(#{tabName}) as seqid from dual")
    int hcSeqNextYearSuffix(@Param("tabName") String tabName);

    @Select("select hcseq_nextval_day(#{tabname}) as seqid from dual")
    int hcseq_nextval_day(@Param("tabname") String orderid);
}
